package com.canaan.business.common.enums.inOutStock;

public enum BillBindOperationEnum {
    RECEIVE_PRODUCT(1,"采购收货"),
    PURCHASE_RETURN(3,"采购退货"),
    ADJUST_IN(4,"调拨入库"),
    ADJUST_OUT(5,"调拨出库");
    private final Integer code;
    private final String message;

    BillBindOperationEnum(Integer code, String info)
    {
        this.code = code;
        this.message = info;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static String getMessageByCode(Integer code){
        if(code == null){
            return null;
        }
        String message = null;
        for (BillBindOperationEnum value : values()) {
            if(value.getCode().equals(code)){
                message = value.getMessage();
                break;
            }
        }
        return message;
    }
}
